<style>
    .biaoti {
        /*border-bottom: 1px solid #ccc;*/
        padding: 10px;
        box-sizing: border-box;
        background: #e3eced;
        display: flex;
        align-items: center;
        span-size: 16px;
        color: #666;
        margin-bottom: 20px;
    }

    .biaoti .xian {
        width: 8px;
        height: 20px;
        background: #18bc9c;
        margin-right: 10px;
    }

    .kk {
        width: 49%;
        background: #fff;
    }

    body {
        background: #f2f2f2 !important;
    }

    .is-dialog #main {
        background: #f2f2f2 !important;
    }

    .tabs {
        background: #fff;
        margin-top: 20px;
    }

    .tabs-content {
        display: flex;
        flex-direction: column-reverse;
        padding-top: 20px;
        width: 95%;
        margin: auto;
    }

    .tabs-content > .tab {
        display: none;
    }

    .tabs-content > div.active {
        display: block;
    }

    .tabs-content .tab .left {
        width: 25%;
        float: left;
    }

    .tabs-content .tab .right {
        width: 25%;
        float: left;
    }

    .tabs-content .tab .zhong {
        width: 25%;
        float: left;
    }

    .tabs .col-sm-2 {
        width: 100%;
        text-align: left;
    }

    .tab-label {
        width: 140px;
        text-align: center;
        cursor: pointer;
        height: 30px;
        line-height: 30px;
        margin: 0;
    }

    .tab-label.active {
        background: #1E9FFF;
        color: #fff;
    }

    .tab-labels {
        /*padding: 10px;*/
        box-sizing: border-box;
        background: #e3eced;
        display: flex;
        align-items: center;
        span-size: 14px;
        color: #666;
    }

    .tab-labels .xian {
        width: 8px;
        height: 20px;
        background: #18bc9c;
        margin-right: 10px;
        margin-left: 10px;
    }

    .tcxm-td td {
        background: #3683D3;
        color: #fff;
        text-align: center;
        border-right: 1px solid;
    }

    .form-inline input {
        width: 100% !important;
    }

    .form-inline td:nth-child(2) input {
        width: 12% !important;
    }

    .form-inline td {
        border-right: 1px solid #e6e6e6;
        border-bottom: 1px solid #e6e6e6;
    }

    .form-inline td:nth-child(1) {
        border-left: 1px solid #e6e6e6;
    }

    .form-inline td:nth-child(2) {
        text-align: center;
    }

</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="id" value="{$row.id}">
    <input type="hidden" name="tong_number" value="{$row.tong_number}">
    <div style="display: flex;width:100%;justify-content: space-between">
        <div class="kk">
            <div class="biaoti">
                <div class="xian"></div>
                车主信息
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('车主姓名')}<span
                        style="color:red">*</span>:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-car_owner" class="form-control" name="row[car_owner]" type="text"
                           value="{$row.car_owner}" data-rule="required">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('证件类型')}<span
                        style="color:red">*</span>:</label>
                <div class="col-xs-12 col-sm-8">
                    <select name="row[car_card_kind]" id="c-car_card_kind" class="form-control">
                        <option value="0"
                        <?php if($row['car_card_kind']=="0"){?> selected<?php }?>>身份证</option>
                        <option value="1"
                        <?php if($row['car_card_kind']=="1"){?> selected<?php }?>>统一社会信用代码</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('证件号')}<span style="color:red">*</span>:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-car_card" class="form-control" name="row[car_card]" type="text" value="{$row.car_card}"
                           data-rule="required">
                </div>
            </div>


        </div>
        <div class="kk">
            <div class="biaoti">
                <div class="xian"></div>
                被服务人（付款人）
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('姓名')}<span style="color:red">*</span>:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-learned_name" class="form-control" name="row[learned_name]" type="text"
                           value="{$row.learned_name}" data-rule="required">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('证件类型')}<span
                        style="color:red">*</span>:</label>
                <div class="col-xs-12 col-sm-8">
                    <select name="row[learned_kind]" id="c-learned_kind" class="form-control">
                        <option value="0"
                        <?php if($row['learned_kind']=="0"){?> selected<?php }?>>身份证</option>
                        <option value="1"
                        <?php if($row['learned_kind']=="1"){?> selected<?php }?>>统一社会信用代码</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('证件号')}<span style="color:red">*</span>:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-learned_num" class="form-control" name="row[learned_num]" type="text"
                           value="{$row.learned_num}" data-rule="required">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('手机')}<span style="color:red">*</span>:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-learned_phone" class="form-control" name="row[learned_phone]" type="text"
                           value="{$row.learned_phone}" data-rule="required">
                </div>
            </div>
            <!--            <div class="form-group layer-footer">-->
            <!--                <label class="control-label col-xs-12 col-sm-2"></label>-->
            <!--                <div class="col-xs-12 col-sm-8">-->
            <!--                    <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>-->
            <!--                </div>-->
            <!--            </div>-->
        </div>
    </div>

    <div class="tabs">
        <div class="tab-labels">
            <div class="xian"></div>
            <label class="tab-label active" for="tab1">车辆信息</label>
            <label class="tab-label" for="tab2">服务项目</label>
            <label class="tab-label" for="tab3">特约及争议解决方式</label>
            <label class="tab-label" for="tab4">影像资料</label>
            <label class="tab-label" for="tab5">批文</label>
        </div>
        <div class="tabs-content">
            <div id="tab1" class="tab active">
                <input type="hidden" id="c-car_leixing" name="row[car_leixing]" value="{$row.car_leixing}">
                <input type="hidden" name="row[main_sumdiscount]" id="addz" value="{$row.main_sumdiscount}"
                       readonly=""/>
                <input type="hidden" name="row[car_lastyear]" id="car_lastyear" value="{$row.car_lastyear}"
                       readonly=""/>
                <input type="hidden" name="row[haocolor]" id="haocolor" value="{$row.haocolor}" readonly=""/>

                <div class="left">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Plan_strattime')}:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-plan_strattime" class="form-control datetimepicker"
                                   data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true"
                                   name="row[plan_strattime]" type="text"
                                   value="{:date('Y-m-d H:i:s', $row['plan_strattime'])}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Yw_come')}:</label>
                        <div class="col-xs-12 col-sm-10">
                            {:build_select('row[yw_come]', $jigoudata, $row.yw_come, ['class'=>'form-control',
                            'required'=>''])}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Car_num')}<span style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-car_num" class="form-control" name="row[car_num]" type="text"
                                   value="{$row.car_num}">
                            <!--                            <input type="checkbox" style="width: 20px;height: 20px;margin:5px;"-->
                            <!--                                   name="row[car_is_new]" value="{$row.car_is_new}" id="isnew" >-->
                            <!--                            <span style="line-height: 30px;">新车</span>-->
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Car_register')}<span
                                style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-car_register" class="form-control" name="row[car_register]" type="text"
                                   value="{$row.car_register}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Car_use_nature')}<span
                                style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <select name="row[car_use_nature]" id="c-car_use_nature" class="form-control">
                                <?php foreach($xingzhi as $k => $v){?>

                                <option value="{$v}"
                                <?php if($row['car_use_nature']== $v){?> selected<?php }?>>{$k}</option>

                                <?php }?>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Car_carry_peo')}<span
                                style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-car_carry_peo" class="form-control" name="row[car_carry_peo]" type="number"
                                   value="{$row.car_carry_peo}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Car_curb_weight')}:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-car_curb_weight" class="form-control" name="row[car_curb_weight]" type="text"
                                   value="{$row.car_curb_weight}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">业务费用比例%<span
                                style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="main_netrate" class="form-control zd" name="row[main_netrate]" type="text"
                                   value="{$row.main_netrate}" oninput='v1()'>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">销管费用比例<span
                                style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="main_xiaoguan_bili" class="form-control zd" name="row[main_xiaoguan_bili]"
                                   type="text"
                                   value="{$row.main_xiaoguan_bili}" oninput='v2()'>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">运营费用比例<span
                                style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="main_yunying_bili" class="form-control zd" name="row[main_yunying_bili]"
                                   type="text"
                                   value="{$row.main_yunying_bili}" oninput='v3()'>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">服务净费（合计）<span
                                style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="main_tongchoujingfee_heji" class="form-control "
                                   name="row[main_tongchoujingfee_heji]" type="text"
                                   value="{$row.main_tongchoujingfee_heji}">
                        </div>
                    </div>
                </div>
                <div class="zhong">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Plan_endtime')}:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-plan_endtime" class="form-control datetimepicker"
                                   data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true"
                                   name="row[plan_endtime]" type="text"
                                   value="{:date('Y-m-d H:i:s', $row['plan_endtime'])}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Yw_class')}:</label>
                        <div class="col-xs-12 col-sm-10">
                            <select name="row[yw_class]" id="yw_class" class="form-control">
                                <?php foreach($selectMenu as $k => $v){?>

                                <option value="{$v.id}" {if condition="$row.yw_class eq $v.id" }selected{else
                                /}''{/if}>{$v.name}</option>

                                <?php }?>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Car_vin')}<span style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-car_vin" class="form-control" name="row[car_vin]" type="text"
                                   value="{$row.car_vin}">
                            <!--                            <div id="che_sou" style="position:absolute;right:22px;top:6px;">搜索</div>-->
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Chexing')}<span style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <select name="row[chexing]" id="c-chexing" class="form-control">
                                <?php foreach($chexing as $k => $v){?>

                                <option value="{$v}"
                                <?php if($row['chexing']== $v){?> selected<?php }?>>{$k}</option>

                                <?php }?>

                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Car_carry_quality')}<span
                                style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-car_carry_quality" class="form-control" name="row[car_carry_quality]"
                                   type="text" value="{$row.car_carry_quality}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Car_reall')}:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-car_reall" class="form-control" name="row[car_reall]" type="text"
                                   value="{$row.car_reall}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">费率:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="dong_fee" class="form-control zd" name="row[dong_fee]" type="text"
                                   value="{$row.dong_fee}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">业务费用:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="main_netcost" class="form-control " name="row[main_netcost]" type="text"
                                   value="{$row.main_netcost}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">销管费用:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="main_xiaoguan" class="form-control " name="row[main_xiaoguan]" type="text"
                                   value="{$row.main_xiaoguan}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">运营费用:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="main_yunying" class="form-control " name="row[main_yunying]" type="text"
                                   value="{$row.main_yunying}">
                        </div>
                    </div>

                </div>
                <div class="right">
                    <div class="form-group" style="height: 62px;padding-top: 25px;">
                        <label class="control-label col-xs-12" style="width: 20%;text-align: left;padding-right: 0;">服务天数:</label>
                        <div class="col-xs-12 col-sm-8" style="margin-top: 7px;padding-left: 0;" id="datecount">
                            365天
                        </div>
                    </div>
                    <!--                    <div class="form-group" style="height: 62px;">-->
                    <!--                        <label class="control-label col-xs-12" style="width: 20%;text-align: left;padding-right: 0;"></label>-->
                    <!--                        <div class="col-xs-12 col-sm-10" style="margin-top: 7px;padding-left: 0;">-->

                    <!--                        </div>-->
                    <!--                    </div>-->
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Yw_belonger')}:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-yw_belonger" class="form-control" name="row[yw_belonger]" type="text"
                                   value="{$row.yw_belonger}" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Car_engine')}<span
                                style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-car_engine" class="form-control" name="row[car_engine]" type="text"
                                   value="{$row.car_engine}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Chexing_ci')}:</label>
                        <div class="col-xs-12 col-sm-10">
                            <select name="row[chexing_ci]" id="ncd" class="form-control">
                            </select>

                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Car_buy')}:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-car_buy" class="form-control" name="row[car_buy]" type="text"
                                   value="{$row.car_buy}">
                        </div>
                    </div>
                    <!--                    **************************************************************************************************-->
                    <div class="form-group" style="height: 62px;">
                        <label class="control-label col-xs-12"
                               style="width: 20%;text-align: left;padding-right: 0;"></label>
                        <div class="col-xs-12 col-sm-10" style="margin-top: 7px;padding-left: 0;">

                        </div>
                    </div>
                    <div class="form-group" style="height: 62px;">
                        <label class="control-label col-xs-12"
                               style="width: 20%;text-align: left;padding-right: 0;"></label>
                        <div class="col-xs-12 col-sm-10" style="margin-top: 7px;padding-left: 0;">

                        </div>
                    </div>
                    <!--                    **************************************************************************************************-->
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">应收服务费（合计）:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="main_tongchoufee_heji" class="form-control " name="row[main_tongchoufee_heji]"
                                   type="text"
                                   value="{$row.main_tongchoufee_heji}">
                        </div>
                    </div>
                </div>
                <div class="right">
                    <div class="form-group" style="height: 62px;">
                        <label class="control-label col-xs-12"
                               style="width: 20%;text-align: left;padding-right: 0;"></label>
                        <div class="col-xs-12 col-sm-10" style="margin-top: 7px;padding-left: 0;">

                        </div>
                    </div>
                    <div class="form-group" style="height: 62px;">
                        <label class="control-label col-xs-12"
                               style="width: 20%;text-align: left;padding-right: 0;"></label>
                        <div class="col-xs-12 col-sm-10" style="margin-top: 7px;padding-left: 0;">

                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Car_factory_num')}<span style="color:red">*</span>:</label>
                        <div class="col-xs-12 col-sm-10">
                            <input id="c-car_factory_num" class="form-control" name="row[car_factory_num]" type="text"
                                   value="{$row.car_factory_num}">
                            <!--                            <div id="chang_sou" style="position:absolute;right:22px;top:6px;">搜索</div>-->
                        </div>
                    </div>
                </div>
            </div>
            <div id="tab2" class="tab">
                <div class="form-group row">
                    <!--                    <label class="control-label col-xs-12">{:__('Fieldlist二维数组示例')}:</label>-->
                    <div class="col-xs-12">
                        <table class="table fieldlist" data-template="basictpl" data-name="row[basic]" id="first-table">
                            <tr class="tcxm-td">
                                <td><input type="checkbox" name="" id="checks"></td>
                                <td>{:__('主服务项目')}</td>
                                <td>{:__('服务金额')}</td>
                                <td>{:__('不计免赔')}</td>
                                <td>{:__('标准服务费')}</td>
                                <td>{:__('折扣(%)')}</td>
                                <td>{:__('应缴服务费')}</td>
                                <!--                                <td width="100"></td>-->
                            </tr>
                            <!--                            机动车损失服务-->
                            <tr class="form-inline">
                                <td style="text-align: center">
                                    <input type="checkbox" name="row[main_name]" id="main_name" value="{$row.main_name}"
                                           class="chk" <?= $row['main_name'] ==1? ' checked="checked"' : '';?> disabled>
                                </td>
                                <td>机动车损失服务</td>
                                <td><input type="text" name="row[main_money]" id="main_money" class="form-control"
                                           size="15" value="{$row.main_money}" placeholder="" readonly/></td>
                                <td style="text-align: center">
                                    <input type="checkbox" value="{$row.main_franchise}" name="row[main_franchise]"
                                           id="main_franchise" disabled>
                                </td>
                                <td><input type="text" name="row[main_standard]" id="main_standard"
                                           class="form-control zongshu" value="{$row.main_standard}" readonly/></td>
                                <td><input type="text" name="row[main_discount]" id="sun" class="form-control"
                                           value="{$row.main_discount}" readonly/></td>
                                <td><input type="text" name="row[main_submit]" id="main_submit"
                                           class="form-control zong_tongchou" value="{$row.main_submit}" readonly/></td>
                            </tr>
                            <!--                            机动车损失服务-->
                            <tr class="form-inline">
                                <td style="text-align: center">
                                    <input type="checkbox" name="row[main_disan]" id="main_disan"
                                           value="{$row.main_disan}"
                                           class="chk" <?= $row['main_disan'] ==1? ' checked="checked"' : '';?>
                                    disabled>
                                </td>
                                <td>机动车第三者责任服务</td>
                                <td>
                                    <input type="text" class="form-control" name="row[main_santong]"
                                           value="{$row.main_santong}" readonly="readonly" id="main_santong">
                                </td>
                                <td style="text-align: center">
                                    <input type="checkbox" value="{$row.main_ji}" name="row[main_ji]" id="main_ji"
                                           disabled/>
                                </td>
                                <td><input type="text" name="row[main_biao]" id="main_biao" class="form-control zongshu"
                                           value="{$row.main_biao}"/></td>
                                <td><input type="text" name="row[main_zhe]" id="san" class="form-control"
                                           value="{$row.main_zhe}" readonly/></td>
                                <td><input type="text" name="row[main_yingjiao]" id="main_yingjiao"
                                           class="form-control zong_tongchou" value="{$row.main_yingjiao}" readonly/>
                                </td>
                            </tr>
                            <!--                            机动车损失服务-->
                            <tr class="form-inline">
                                <td style="text-align: center">
                                    <input type="checkbox" name="row[siji]" id="si_jis" value="{$row.siji}"
                                           class="chk" <?= $row['siji'] ==1? ' checked="checked"' : '';?> disabled>
                                </td>
                                <td>车上人员责任服务(司机)<input type="text" class="form-control" value="1"
                                                                 style="text-align: center" disabled/></td>
                                <td>
                                    <input type="text" class="form-control" name="row[siji_tong]"
                                           value="{$row.siji_tong}" readonly="readonly" id="siji_tong">
                                </td>
                                <td style="text-align: center">
                                    <input type="checkbox" value="{$row.siji_ji}" name="row[siji_ji]" id="siji_ji"
                                           disabled/>
                                </td>
                                <td><input type="text" name="row[siji_biao]" id="siji_biao" class="form-control zongshu"
                                           value="{$row.siji_biao}"/></td>
                                <td><input type="text" name="row[siji_zhe]" id="siji" class="form-control"
                                           value="{$row.siji_zhe}" readonly/></td>
                                <td><input type="text" name="row[siji_ying]" id="siji_ying"
                                           class="form-control zong_tongchou" value="{$row.siji_ying}" readonly/></td>
                            </tr>
                            <!--                            机动车损失服务-->
                            <tr class="form-inline">
                                <td style="text-align: center">
                                    <input type="checkbox" name="row[chengke]" id="chengkess" value="{$row.chengke}"
                                           class="chk" <?= $row['chengke'] ==1? ' checked="checked"' : '';?> disabled>
                                </td>
                                <td>车上人员责任服务(乘客)<input type="text" name="row[chengke_zuo]" id="zuo"
                                                                 class="form-control" size="15"
                                                                 value="{$row.chengke_zuo}" style="text-align: center"
                                                                 readonly/>座
                                </td>
                                <td>
                                    <input type="hidden" name="row[ck_tong]" id="ck_tong" value="{$row.ck_tong}"
                                           readonly="readonly"
                                           style="width: 100%;height: 100%;border: none;margin: 0;">
                                    <input type="text" class="form-control" name="row[ck_money]" value="{$row.ck_money}"
                                           readonly="readonly" id="ck">
                                </td>
                                <td style="text-align: center">
                                    <input type="checkbox" name="row[ck_ji]" id="ck_ji" value="{$row.ck_ji}" disabled/>
                                </td>
                                <td><input type="text" name="row[ck_biao]" id="ck_biao" class="form-control zongshu"
                                           value="{$row.ck_biao}"/></td>
                                <td><input type="text" name="row[ck_zhe]" id="cheng" class="form-control"
                                           value="{$row.ck_zhe}" readonly/></td>
                                <td><input type="text" name="row[ck_ying]" id="ck_ying"
                                           class="form-control zong_tongchou" value="{$row.ck_ying}" readonly/></td>
                            </tr>
                            <tr class="tcxm-td">
                                <td><input type="checkbox" lay-filter="checkall" name="" id="checkss"></td>
                                <td>{:__('附加服务项目')}</td>
                                <td>{:__('服务金额')}</td>
                                <td>{:__('不计免赔')}</td>
                                <td>{:__('标准服务费')}</td>
                                <td>{:__('折扣(%)')}</td>
                                <td>{:__('应缴服务费')}</td>
                                <!--                                <td width="100"></td>-->
                            </tr>
                            <!--                            机动车损失服务-->
                            <tr class="form-inline">
                                <td style="text-align: center">
                                    <input type="checkbox" name="row[dao_name]" id="dao_name" value="{$row.dao_name}"
                                           class="chks" <?= $row['dao_name'] ==1? ' checked="checked"' : '';?> disabled>
                                </td>
                                <td>三者医保外用药</td>
                                <td>
                                    <input type="text" class="form-control" name="row[dao_tong]" value="{$row.dao_tong}"
                                           readonly="readonly" id="dao_tong">
                                </td>
                                <td style="text-align: center">
                                    <input type="checkbox" value="{$row.dao_ji}" name="row[dao_ji]" id="dao_ji"
                                           disabled/>
                                </td>
                                <td><input type="text" name="row[dao_biao]" id="dao_biao" class="form-control zongshu"
                                           value="{$row.dao_biao}" readonly/></td>
                                <td><input type="text" name="row[dao_zhe]" id="dao" class="form-control" value="100"
                                           readonly/></td>
                                <td><input type="text" name="row[dao_ying]" id="dao_ying"
                                           class="form-control zong_tongchou" value="{$row.dao_ying}" readonly/></td>
                            </tr>
                            <tr class="form-inline">
                                <td style="text-align: center">
                                    <input type="checkbox" name="row[dianwang]" value="{$row.dianwang}" id="dianwangs"
                                           class="chks" <?= $row['dianwang'] ==1? ' checked="checked"' : '';?> disabled>
                                </td>
                                <td>附加外部电网故障损失险</td>
                                <td><input type="text" name="row[dw_tong]" id="dw_tong" class="form-control" size="15"
                                           value="{$row.dw_tong}" placeholder="" readonly/></td>
                                <td style="text-align: center">
                                    <input type="checkbox" name="row[dw_ji]" id="dw_ji" value="{$row.dw_ji}" disabled/>
                                </td>
                                <td><input type="text" name="row[dw_biao]" id="dw_biao" class="form-control zongshu"
                                           value="{$row.dw_biao}" readonly/></td>
                                <td><input type="text" name="row[dw_zhe]" id="dw" class="form-control" value="100"
                                           readonly/></td>
                                <td><input type="text" name="row[dw_ying]" id="dw_ying"
                                           class="form-control zong_tongchou" value="{$row.dw_ying}" readonly/></td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="form-group">
                    <!--                    <div class="left">-->
                    <!--                        <div class="form-group">-->
                    <!--                            <label class="control-label col-xs-12 col-sm-2">{:__('交强')}:</label>-->
                    <!--                            <div class="col-xs-12 col-sm-10">-->
                    <!--                                <input type="text" class="form-control" placeholder="请输入交强" name="row[jq_price]" id="jq_price" oninput="vs()" onpropertychange="vs()" value="">-->
                    <!--                            </div>-->
                    <!--                        </div>-->
                    <!--                    </div>-->
                    <!--                    <div class="zhong">-->
                    <!--                        <div class="form-group">-->
                    <!--                            <label class="control-label col-xs-12 col-sm-2">{:__('车船税')}:</label>-->
                    <!--                            <div class="col-xs-12 col-sm-10">-->
                    <!--                                <input type="text" class="form-control" placeholder="请输入车船税" name="row[cc_price]" id="cc_price" oninput="vs()" onpropertychange="vs()" value="">-->
                    <!--                            </div>-->
                    <!--                        </div>-->
                    <!--                    </div>-->
                    <div class="right">
                        <div class="form-group">
                            <label class="control-label col-xs-12 col-sm-2">{:__('标准服务费（合计）')}:</label>
                            <div class="col-xs-12 col-sm-10">
                                <input type="text" class="form-control" placeholder="请输入标准服务费（合计）"
                                       name="row[main_sum]" id="main_sum" oninput="vs()" onpropertychange="vs()"
                                       value="{$row.main_sum}" readonly="readonly">
                            </div>
                        </div>
                    </div>
                    <div class="right">
                        <div class="form-group">
                            <label class="control-label col-xs-12 col-sm-2">{:__('服务费（合计）')}:</label>
                            <div class="col-xs-12 col-sm-10">
                                <input type="text" class="form-control" placeholder="请输入服务费（合计）"
                                       name="row[main_free]" id="main_free" oninput="vs()" onpropertychange="vs()"
                                       value="{$row.main_free}" readonly="readonly">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="tab3" class="tab">
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2" style="width: 110px;">{:__('争议解决方')}:</label>
                    <div class="col-xs-12 col-sm-8" style="top: 7px;left: 0">
                        <input type="radio" name="row[resolvent]"
                               value="{$row.resolvent}"  <?= $row['resolvent'] == 1 ? ' checked="checked"' : '';?>/> 诉讼
                        <input type="radio" name="row[resolvent]"
                               value="{$row.resolvent}"  <?= $row['resolvent'] == 2 ? ' checked="checked"' : '';?>/>仲裁
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">{:__('特别约定')}:</label>
                    <div class="col-xs-12 col-sm-10">
                        <textarea name="row[special]" rows="5" cols="10" id="txt" value="" readonly=""
                                  class="form-control" style="background: #fff;">{$row.special}</textarea>
                    </div>
                </div>
            </div>
            <div id="tab4" class="tab" style="min-height: 300px;">
                <?php foreach($file as $k => $v){?>
                <img src="{$v.url}" data-magnify="gallery" data-src="{$v.url}" width="100px">
                <?php }?>
            </div>
            <div id="tab5" class="tab">
                <!--                <textarea name="row[pigai_piwen]" rows="" cols="" readonly="readonly" class="form-control"></textarea>-->
                <div class="col-xs-12 col-sm-10" style="bottom: 10px;">
                        <textarea name="row[pigai_piwen]" rows="5" cols="10" id="txt" value="" readonly=""
                                  class="form-control" style="background: #fff;">{$row.pigai_piwen}</textarea>
                </div>
            </div>
        </div>
    </div>

    <style>
        .shenhe {
            background-color: #fff;
            margin-top: 20px;
            height: 100%;
            margin-bottom: 100px;
        }

        .shenhe-content {
            display: flex;
            flex-direction: column-reverse;
            /*padding-top: 20px;*/
            width: 100%;
            margin: auto;
        }

        .shenhe-content .fieldlist {
            width: 98%;
            margin: auto;
        }

        .shenhe-td td {
            /*background: #3683D3;*/
            background: #f2f2f2;
            color: #000;
            text-align: left;
            border-right: 1px solid #e6e6e6;
        }

        .shenhe-td td:nth-child(1) {
            width: 200px;
            border-left: 1px solid #e6e6e6;
        }

        .shenhe-td td:nth-child(2) {
            width: 150px;
        }

        .shenhe-inline td {
            border-right: 1px solid #e6e6e6;
            border-bottom: 1px solid #e6e6e6;
        }

        .shenhe-inline td:nth-child(1) {
            border-left: 1px solid #e6e6e6;
        }

        .shenhe-inline td:nth-child(1) {
            text-align: left;
        }
    </style>
    <div class="shenhe">
        <div class="biaoti">
            <div class="xian"></div>
            审核情况
        </div>
        <div class="shenhe-content">
            <table class="table fieldlist" data-template="basictpl" data-name="row[basic]" id="">
                <tr class="shenhe-td">
                    <td>{:__('审核时间')}</td>
                    <td>{:__('审核人')}</td>
                    <td>{:__('审核意见')}</td>
                </tr>
                {volist name='yijian' id='vo'}
                <tr class="shenhe-inline">
                    <td>{$vo.shen_time|date='Y-m-d H:i:s',###}</td>
                    <td>{$vo.shen_peo}</td>
                    <td>{$vo.shen_yijian}</td>
                </tr>
                {/volist}
                <tr class="shenhe-inline">
                    <td><input type="text" class="form-control" readonly name="shenhe_time"
                               value="<?php echo date('Y-m-d H:i:s',time());?>"></td>
                    <td><input type="text" class="form-control" readonly name="shenhe_peo" value="{$admin.username}">
                    </td>
                    <td><input type="text" class="form-control" id="shenhe_yijian" name="shenhe_yijian"
                               style="width:500px;"></td>
                </tr>
                <div class="form-group " style="margin-top: 50px;">
                    <label class="control-label col-xs-12 col-sm-2"></label>
                    <div class="col-xs-12 col-sm-8" style="text-align: center;margin: auto;">
                        <button type="button" class="btn btn-primary btn-embossed " onclick="zancun()">
                            {:__('返回修改')}
                        </button>
                        <button type="button" class="btn btn-primary btn-embossed " onclick="tuihuishiji()">
                            {:__('退回上一步')}
                        </button>
                        <button type="button" class="btn btn-primary btn-embossed "
                                onclick="ajaxPost()">{:__('通过审核')}
                        </button>
                    </div>
                </div>
            </table>
        </div>
    </div>
</form>
<style type="text/css">
    .danxuan {
        margin-right: 20px;
    }

    #quanfei, #jingfei, #qita-fei {
        display: none;
    }

</style>

<script src="/assets/libs/jquery/dist/jquery.js"></script>
<script>
    $(document).ready(function () {
        $('.tab-label').click(function () {
            // 移除所有标签的激活状态和内容的显示状态
            $('.tab-label, .tab').removeClass('active');
            // 添加激活状态到点击的标签和对应的内容
            $(this).addClass('active');
            $('#' + $(this).attr('for')).addClass('active');
        });
    });
</script>

<script>
    $(document).ready(function () {
        $('input').prop('readonly', 'readonly'); // 或者使用 attr('readonly', 'readonly')
        $('select').attr('disabled', 'disabled');

        $('.zd').prop('readonly', false);    // 使 id 为 "myInput" 的输入框可编辑
        $('#shenhe_yijian').prop('readonly', false);
    });
</script>
<script>
    function v1() {
        let dong_fee = parseFloat($("#dong_fee").val()) || 1;
        let main_free = parseFloat($('#main_free').val());
        let main_netrate = parseFloat($('#main_netrate').val()) || 0;

        // 业务
        let main_netcost = (main_free / dong_fee * main_netrate / 100).toFixed(2);
        $('#main_netcost').val(main_netcost);

        let main_tongchoufee_heji = (main_free - main_netcost).toFixed(2);
        $('#main_tongchoufee_heji').val(main_tongchoufee_heji);

        v3();
    }

    function v2() {
        let main_free = parseFloat($('#main_free').val());
        let main_xiaoguan_bili = parseFloat($('#main_xiaoguan_bili').val()) || 0;

        // 销管
        let main_xiaoguan = (main_free * main_xiaoguan_bili / 100).toFixed(2);
        console.log(main_xiaoguan)
        $('#main_xiaoguan').val(main_xiaoguan);

        v3();
    }

    function v3() {
        let main_free = parseFloat($('#main_free').val());
        let main_netcost = parseFloat($('#main_netcost').val());
        let main_xiaoguan = parseFloat($('#main_xiaoguan').val());
        let main_yunying_bili = parseFloat($('#main_yunying_bili').val()) || 0;

        // 运营
        let main_yunying = ((main_free - main_netcost - main_xiaoguan) * main_yunying_bili / 100).toFixed(2);
        $('#main_yunying').val(main_yunying);

        let main_tongchoujingfee_heji = (main_free - main_netcost - main_xiaoguan - main_yunying).toFixed(2);
        $('#main_tongchoujingfee_heji').val(main_tongchoujingfee_heji);
    }


    //通过审核
    function ajaxPost() {
        if (!$('#main_netrate').val()) {
            layer.msg('业务费用比例不能为空');
            $('#main_netrate').focus();
            return false;
        }
        if (!$('#main_xiaoguan_bili').val()) {
            layer.msg('销管费用比例不能为空');
            $('#main_xiaoguan_bili').focus();
            return false;
        }
        if (!$('#main_yunying_bili').val()) {
            layer.msg('业务费用比例不能为空');
            $('#main_yunying_bili').focus();
            return false;
        }
        //提交数据
        var formData = $("#add-form").serialize();
        $.ajax({
            type: "post",
            dataType: 'json',
            url: "{:url('pigai/shenhes/pzuihou')}",
            data: formData,
            success: function (res) {
                if (res.code == 1) {
                    layer.msg(res.msg, {time: 2000}, function () {
                        layer.closeAll()
                        parent.layer.closeAll();
                        parent.$("#table").bootstrapTable('refresh', {});
                    });
                } else {
                    layer.msg(res.msg);
                }
            }
        });
    }

    //暂存
    function zancun() {
        //提交数据
        var formData = $("#add-form").serialize();
        $.ajax({
            type: "post",
            dataType: 'json',
            url: "{:url('pigai/shenhes/tuihui')}",
            data: formData,
            success: function (res) {
                console.log(res);
                if (res.code == 1) {
                    layer.msg(res.msg, {time: 2000}, function () {
                        layer.closeAll()
                        parent.layer.closeAll();
                        parent.$("#table").bootstrapTable('refresh', {});
                    });
                } else {
                    layer.msg(res.msg);
                }
            }
        });
    }

    function tuihuishiji() {
        //提交数据
        var formData = $("#add-form").serialize();
        $.ajax({
            type: "post",
            dataType: 'json',
            url: "{:url('pigai/shenhes/tuihuishiji')}",
            data: formData,
            success: function (res) {
                console.log(res);
                if (res.code == 1) {
                    layer.msg(res.msg, {time: 2000}, function () {
                        layer.closeAll()
                        parent.layer.closeAll();
                        parent.$("#table").bootstrapTable('refresh', {});
                    });
                } else {
                    layer.msg(res.msg);
                }
            }
        });
    }

    // 	改变事件
    $(function () {
        $('input[name="shenhe_radio"]').change(function () {
            console.log(this.value)
            if (this.value == 3) {
                $("#qita-fei").show()
                $("#jingfei").hide()
                $("#quanfei").hide()
            } else if (this.value == 2) {
                $("#jingfei").show()
                $("#quanfei").hide()
                $("#qita-fei").hide()
            } else if (this.value == 1) {
                $("#jingfei").hide()
                $("#quanfei").show()
                $("#qita-fei").hide()
            }
        })
    })


    $(function () {
        if ($("#c-chexing").val() == '二吨至五吨货车' || $("#c-chexing").val() == '五吨至十吨货车' || $("#c-chexing").val() == '十吨以上货车' || $("#c-chexing").val() == '挂车') {
            var value = '货车'
        } else if ($("#c-chexing").val() == '6座以下' || $("#c-chexing").val() == '6-10座') {
            var value = '家庭自用车'
        } else {
            var value = $("#c-chexing").val()
        }
        cc1(value)

    })

    function cc1(value) {
        var zuzhi_id = $("#yw_class").val()
        console.log('zuzhi_id', zuzhi_id)
        $.ajax({
            type: 'post',
            url: "{:url('pigai/one/select')}",//发送路径
            data: {
                zuzhi_id: zuzhi_id,
                type: value
            },//发送的数据
            dataType: 'json',
            async: false,//是否异步
            success: function (data) {
                var html = '<option >请选择NCD</option>';
                for (var i = 0; i < data.data.length; i++) {
                    console.log('ncd', data)
                    if (data.data[i].ncd == '{$row.ncd}') {
                        html += '<option value="' + data.data[i].zhekou + ',' + data.data[i].ncd + ',' + data.data[i].feiyong + '" selected>' + data.data[i].ncd + '</option>';
                    } else {
                        html += '<option value="' + data.data[i].zhekou + ',' + data.data[i].ncd + ',' + data.data[i].feiyong + '">' + data.data[i].ncd + '</option>';
                    }

                }
                $("#ncd").html(html)
            }
        })
    }
</script>